home *** CD-ROM | disk | FTP | other *** search
/ Student Private Syndrome 3 / Student Private Syndrome 3.iso / private / photo / photo.dxr / 00001.ls next >
Encoding:
Text File  |  1996-06-21  |  1.5 KB  |  60 lines

  1. on startMovie
  2.   global sndname, seclick
  3.   sound stop 1
  4.   set sndname to "@::SOUND:S31.AIF"
  5.   set seclick to "SE01"
  6. end
  7.  
  8. on pushbutton
  9.   set ch to clickOn()
  10.   set cname1 to item 1 of the name of cast the castNum of sprite ch
  11.   set cname2 to item 2 of the name of cast the castNum of sprite ch
  12.   repeat while the stillDown
  13.     if rollOver(ch) then
  14.       set the castNum of sprite ch to the number of cast (cname1 & "," & "ON")
  15.     else
  16.       set the castNum of sprite ch to the number of cast (cname1 & "," & cname2)
  17.     end if
  18.     updateStage()
  19.   end repeat
  20.   if rollOver(ch) then
  21.     set the castNum of sprite ch to the number of cast (cname1 & "," & "ON")
  22.     set ret to 1
  23.   else
  24.     set the castNum of sprite ch to the number of cast (cname1 & "," & cname2)
  25.     set ret to 0
  26.   end if
  27.   updateStage()
  28.   return ret
  29. end
  30.  
  31. on getphotono nphoto
  32.   if nphoto = (the number of cast "60.PIC" + 1) then
  33.     return the number of cast "01.PIC"
  34.   else
  35.     if nphoto = (the number of cast "01.PIC" - 1) then
  36.       return the number of cast "60.PIC"
  37.     else
  38.       return nphoto
  39.     end if
  40.   end if
  41. end
  42.  
  43. on modebutton
  44.   global photomode
  45.   if pushbutton() then
  46.     set ch to clickOn()
  47.     set cname to item 1 of the name of cast the castNum of sprite ch
  48.     puppetSprite(21 - ch, 0)
  49.     set the castNum of sprite (21 - ch) to the number of cast (photomode & ",OFF")
  50.     puppetSprite(ch, 1)
  51.     set the castNum of sprite ch to the number of cast (cname & ",ON")
  52.     updateStage()
  53.     set photomode to cname
  54.   end if
  55. end
  56.  
  57. on changephoto nphoto
  58.   set the castNum of sprite 2 to nphoto
  59. end
  60.